import { Card, Button } from 'antd';
import ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css';
import { useState } from 'react';

const Index = () => {
  const [value, setValue] = useState('');

  const fn = () => {
    console.log(value);
  };

  return (
    <Card>
      <ReactQuill theme="snow" value={value} onChange={setValue} />
      <Button onClick={fn}>导出内容</Button>

      <div dangerouslySetInnerHTML={{ __html: value }} />
    </Card>
  );
};

export default Index;
